﻿using BCCommon.TMS.Driver;
using System.ComponentModel.DataAnnotations;

namespace BCDto.TMS.Driver.DriverLearnDatum
{
    /// <summary>
    /// 司机学习资料
    /// </summary>
    public class DriverLearnDatumRequestDto
    {
        private DatumAnswerDto[] answers;

        /// <summary>
        /// 学习资料题目
        /// </summary> 
        [Display(Name = "学习资料题目")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [StringLength(200, ErrorMessage = "{0} 长度最大为 {1} 位")]
        public string DatumTopic { get; set; }

        /// <summary>
        /// 答案
        /// </summary>
        [Display(Name = "答案")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public DatumAnswerDto[] Answers
        {
            get { return this.answers ?? new DatumAnswerDto[0]; }
            set { this.answers = value; }
        }

        /// <summary>
        /// 适用司机类型
        /// </summary>
        [Display(Name = "适用司机类型")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public DriverRoleType AppliedTo { get; set; }



    }
}
